<div>
    <div id="messages">
        <span class="red">
            <?php if (count($this->messages)) : ?>
                <ul id="messages">
                <?php foreach ($this->messages as $message) : ?>
                    <li><?php echo $this->escape($message); ?></li>
                <?php endforeach; ?>
                </ul>
            <?php endif; ?>
    </span>
    </div>
    <table class="table table-striped table-hover">
        <thead>
            <tr>
                <th>ID</th>
                <th>ID-Client</th>
                <th>Destinataire</th>
                <th>Expéditeur</th>
                <th>Adresse</th>
                <th>Date de Facturation</th>
                <th>Date de Livraison</th>
                <th>Condition</th>
                <th>Paiement</th>
                <th>Actions</th>
            </tr>
        <tbody>
        <?php foreach ($this->invoices as $invoice) : ?>
            <tr>
                <td><?php echo $invoice->attributes()->id ?></td>
                <td><?php echo $invoice->attributes()->client ?></td>
                <td><?php echo $invoice->dest->nom . " " . $invoice->dest->prenom ?></td>
                <td><?php echo $invoice->exp->nom . " " . $invoice->exp->prenom ?></td>
                <td><?php echo $invoice->dest->adresse ?></td>
                <td><?php echo $invoice->dat->fact ?></td>
                <td><?php echo $invoice->dat->liv ?></td>
                <td><?php echo $invoice->cond ?></td>
                <td><?php echo $invoice->paie ?></td>
                <td>
                    <a href="/Invoice/Index/update/id/<?php echo $invoice->attributes()->id ?>">Modifier</a>
                    <a href="/Invoice/Index/delete/id/<?php echo $invoice->attributes()->id ?>">Supprimer</a>
                </td>
            </tr>
        <?php endforeach; ?>
        </tbody>
    </table>

</div>